home *** CD-ROM | disk | FTP | other *** search
- Path: news.microsoft.com!news
- From: a-cnadc@microsoft.com (Dann Corbit)
- Newsgroups: comp.lang.c
- Subject: Re: Tough Question: The summary of the summary
- Date: 20 Feb 1996 23:07:11 GMT
- Organization: Microsoft Corporation
- Message-ID: <4gdk6v$ojk@news.microsoft.com>
- References: <4gdho9$mll@news.microsoft.com>
- NNTP-Posting-Host: 157.57.171.202
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.14
-
- Here is a summary of the timings for the methods that worked.
- Your mileage may vary.
-
- direct lookup = {0 seconds} ( Yes, it was cheating, but it did fit the spec )
-
- lastNonZeroDigitOfFactorial( n ) = {1 second}
-
- rightmost_nonzero_digit( n ) = {8 seconds}
-
- fact_lsd( n ) = {2 minutes 35 seconds}
-
- factorial_lsd( n ) = {2 minutes 42 seconds}
-
- foo( n ) = {3 minutes 31 seconds}
-
-